# import requests
# from tools.funciton import read_json_file,write_xlsx
# from config.configs import DATA_PATH
# import os
# from time import sleep
#
#
#
# li = []
# res = read_json_file(os.path.join(DATA_PATH, 'gaotskus.json'))
# skus = [str(i['sku']) for i in res]
# for z in range(len(skus)):
#     url = f"https://alpha.geehoop.com/api/backend/goat/query/{skus[z]}"
#     payload = {}
#     headers = {
#         'User-Agent': 'Apifox/1.0.0 (https://apifox.com)',
#         'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY1MGE0YTg2ODNmOTE1YzM4ZDE4YzY0MCIsImlhdCI6MTcyMzY5NDQxOCwiZXhwIjoxNzI0Mjk5MjE4fQ.HXITGCfitpl3q8W7ocnYxOHO1hFckw31I-fWzJURKVk',
#         'Accept': '*/*',
#         'Host': 'alpha.geehoop.com',
#         'Connection': 'keep-alive'
#     }
#     response = requests.request("GET", url, headers=headers, data=payload).json()
#     if 'pictureUrl' in response['data']:
#         li.append([skus[z], response['data']['pictureUrl']])
#     else:
#         print(response)
#         pass
#     sleep(0.5)
# write_xlsx(['sku','image'], li, '新图片')
